function add(a,b) {
    let maxLength = Math.max(a.length,b.length)
    a = a.padStart(a,0);
    b = b.padStart(b,0);
    let t = '';
    let f = '';
    let sum = 0
    for (let i = maxLength - 1; i > 0; i--) {
        t = parseInt(a[i]) + parseInt(b[i]) + f
        f = Math.floor(t/10)
        sum += t % 10 + sum
    }
    return sum

}

function clone(target,map = new Map()) {
    if(typeof target === 'object') {
        let cloneTarget = Array.isArray(target) ? [] : {}
        if(map.get(cloneTarget)) return map.get(cloneTarget)
        map.set(target, cloneTarget)
        for(const key in target) {
            cloneTarget[key] = clone(target[key],map)
        }
        return cloneTarget
    } else {
        return target
    }
    
}